package com.markerhub.modules.app.config;

import com.markerhub.modules.app.interceptor.AuthInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;


/**
 * 添加的拦截规则
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {


    @Resource
    AuthInterceptor authInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authInterceptor).addPathPatterns("/app/**");
    }
}
